<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
	<link rel="stylesheet" type="text/css" href="engine1/style.css" />
	<script type="text/javascript" src="engine1/jquery.js"></script>
    <link rel="stylesheet" type="text/css" href="CSS/css.css" />
	<script type="text/javascript" src="JS/js.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Home</title>
<link href="CSS/layout.css" rel="stylesheet" type="text/css" />
      <script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
  $(function() {
	// load up the results initially with AJAX call
	// see http://api.jquery.com/load/
	
	$('#showCat').submit( function(){
		//send the form values via POST with javascript object
		var data = {
			category: $('#category').val(), 
			storeID: $('#storeID').val()
			}; 
		$('#ajax_results').load('showProducts.php', data);
		
		//prevent the normal submit action since we're using AJAX
		return false;
	}); 	

  });
  </script>
</head>

<body >
<div id="container">
  <div id="Header">
  <img src="images/img.png" alt="Hut" style="float:left;" />
  <ul class="HeaderUl" >
    <li><a href="index1.php" target="_self">&nbsp; Home&nbsp; </a></li>
    <li><a href="createStoreControler.php?action=stores" id="stores" target="_self"> &nbsp;Stores &nbsp;</a></li>
    <li><a href="#" target="_self"> &nbsp;Advertisments&nbsp; </a></li>
    <li><a href="#" target="_self">&nbsp; Link &nbsp;</a></li>
    <li style="border-right-style:none;"><a href="#" target="_self"> &nbsp;Social &nbsp;</a></li>
       <?php
   require_once("include/connection.php");
if(!isset($_SESSION))
session_start();
   if(isset($_SESSION['login']))
{
/*	echo 'welcome '.$_SESSION['user_name'].'</br>';
	echo 'you must logout';
	echo'<a href="logout.php"></a>';*/
	echo'<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n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bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="Registration.php" target="_self"> Sing Up &nbsp;</a></li>
    <li style="border-right-style:none;" ><a href="login.php" target="_self">Log In</a></li>
  </ul> ';
}
?>
    
  <!--<ul style="float:right;display:inline;" >
  <li ><a href="#" target="_self">Log In</a></li>
  </ul>-->
 <!-- End Header Div--> </div>
  <div id="Content">
      <br/>
      <br/><br/>
      
      <br/><br/>
      <?php
      if($add==TRUE){
      
         echo '<div style="color:: #000; position: absolute;">
          <a href="addProductControler.php?action=add" id="create"  style="color: #000000;"> &nbsp;ADD PRODUCT &nbsp;</a> 
      </div>';
         echo "<br/>";
         echo '<div style="color:: #000; position: absolute;">
          <a href="createStoreControler.php?action=editST" id="edit"  style="color: #000000;"> &nbsp;EDIT STORE&nbsp;</a> 
      </div>';
      }
      elseif ($editpro==TRUE) {
          echo $proID;
      echo "<div style='color:: #000; position: absolute;'>
          <a href='createStoreControler.php?action=editPRO&Pid=$proID' id='create'  style='color: #000000;'> &nbsp;EDIT PRODUCT&nbsp;</a> 
      </div>";
}
          ?>
<br/><br/>
<!--
<br/>
       <h2>just for testing</h2>
       <h3>show by category</h3>
        <form id="showCat" action="showProducts.php" method="post">
	
        
	<label>Name</label> 
        <select name="category" id="category">
            <option >pants</option>
            <option>shoes</option>
            <option>t-shirts</option>
            <option selected="">boxers</option>
            <option>accessories</option>
    </select>
       <input type="text" name="name" id="name" /> -->
	<!-- <label >Store ID</label>
        <input type="text" name="storeID" id="storeID" >
        
	<input type="submit" value="show">
        </input>
</form>
       <br/> 
  <div id="ajax_results"></div>
 --> 
  <br/><br/>     
        <div><?php 
            displayProduct($result);
            ?></div>
 
  <!-- End Contant Div--></div>
  <div id="Sidebar">
  <p align="center" style="color:#CCC;"> Search</p>
  <div id="accordian">
	<ul>
		<li>
			<h3><span class="icon-dashboard"></span>Category</h3>
			<ul>
            <li><a>
			    <input type="checkbox" name="check2"  class="check" />Sheos</a></li>
                <li><a>
			    <input type="checkbox" name="check2"  class="check" />T-Shirt</a></li>
                <li><a>
			    <input type="checkbox" name="check2"  class="check" />Cap</a></li>
                <li><a>
			    <input type="checkbox" name="check2"  class="check" />Bullover</a></li>
                <li><a>
			    <input type="checkbox" name="check2"  class="check" />Jeans</a></li>
                <li><a>
			    <input type="checkbox" name="check2"  class="check" />Watch</a></li>
				
			</ul>
		</li>
		<!-- we will keep this LI open by default -->
		<li class="active">
			<h3><span class="icon-tasks"></span>Price</h3>
			<ul>
				<li><a>
			    <input type="checkbox" name="check2"  class="check" />
			    50 LE -> 100 LE</a></li>
				<li><a>
			    <input type="checkbox" name="check2"  class="check" />100 LE -> 150 LE</a></li>
				<li><a>
			    <input type="checkbox" name="check2"  class="check" />150 LE -> 200 LE</a></li>
				<li><a>
			    <input type="checkbox" name="check2"  class="check" />200 LE -> 250 LE</a></li>
				<li><a>
			    <input type="checkbox" name="check2"  class="check" />250 LE -> 300 LE</a></li>
			</ul>
		</li>
		<li>
			<h3><span class="icon-calendar"></span>Size</h3>
			<ul>
				<li><a>
			    <input type="checkbox" name="check2"  class="check" />Small</a></li>
				<li><a>
			    <input type="checkbox" name="check2"  class="check" />Medium</a></li>
				<li><a>
			    <input type="checkbox" name="check2"  class="check" />Large</a></li>
				
			</ul>
		</li>
		<li>
			<h3><span class="icon-heart"></span>Color</h3>
			<ul>
				<li><a>
			    <input type="checkbox" name="check2"  class="check" />Red</a></li>
				<li><a>
			    <input type="checkbox" name="check2"  class="check" />Blue</a></li>
				<li><a>
			    <input type="checkbox" name="check2"  class="check" />Black</a></li>
				<li><a>
			    <input type="checkbox" name="check2"  class="check" />White</a></li>
                <li><a>
			    <input type="checkbox" name="check2"  class="check" />Pink</a></li>
                <li><a>
			    <input type="checkbox" name="check2"  class="check" />Green</a></li>
			</ul>
		</li>
	</ul>
</div>
<!-- prefix free to deal with vendor prefixes -->
<script src="http://thecodeplayer.com/uploads/js/prefixfree-1.0.7.js" type="text/javascript" type="text/javascript"></script>

<!-- jQuery -->
<script src="http://thecodeplayer.com/uploads/js/jquery-1.7.1.min.js" type="text/javascript"></script>
  <!--End SideBar Div--></div>
  <div id="clear"></div>
  
  <div id="Footer">
  <ul class="HeaderUl"  style="padding-top: 2px;">
    <li><a href="#" target="_self">&nbsp; Company&nbsp; </a></li>
    <li><a href="#" target="_self"> &nbsp;Policies &nbsp;</a></li>
    <li><a href="#" target="_self"> &nbsp;Services&nbsp; </a></li>
    <li><a href="createStoreControler.php?action=stores" id="stores" target="_self">&nbsp; Stores &nbsp;</a></li>
    <li style="border-right-style:none;"><a href="#" target="_self"> &nbsp;Contact Us &nbsp;</a></li>

  </ul>
  <!-- End Footer Div--></div>
  
 
	



<!--End Container Div--></div>
</body>
</html>
